package com.example.mylogin;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        intview();
    }
    public  void  intview(){
      ImageView imageView=findViewById(R.id.text_scc);
      ImageView imageView1=findViewById(R.id.text_scv);
        ImageView imageView2=findViewById(R.id.text_scd);

        Animation animation= AnimationUtils.loadAnimation(this,R.anim.anmin_rel);
        imageView.setAnimation(animation);
        Animation animation1= AnimationUtils.loadAnimation(this,R.anim.amin_fen);
        imageView1.setAnimation(animation1);
        Animation animation2= AnimationUtils.loadAnimation(this,R.anim.amin_shi);
        imageView2.setAnimation(animation2);
//        ListView listView=findViewById(R.id.list_context);
//        List<DataBean> list=new ArrayList<>();
//        for(int i=0;i<20;i++){
//            DataBean data=new DataBean();
//            data.setUsername("张三"+i);
//            data.setUserid(R.mipmap.ic_launcher);
//            list.add(data);
//        }
//        Adaper adaper=new Adaper(this,list);
//        listView.setAdapter(adaper);
//        adaper.setOnItemClick(new Adaper.OnItemClick() {
//            @Override
//            public void OnClick(int i) {
//                Toast.makeText(MainActivity.this,"点击了"+list.get(i).getUsername()+"的头像",Toast.LENGTH_SHORT).show();
//            }
//        });
//        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//            @Override
//            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
//                Toast.makeText(MainActivity.this,"点击了"+list.get(i).getUsername(),Toast.LENGTH_SHORT).show();
//            }
//        });
    }

}